#ifndef CUSTOM_HANDLE_H
#define CUSTOM_HANDLE_H

#include <stdio.h>
#include <string.h>
#include <modbus.h>
#include <sys/ipc.h>
#include <sys/shm.h>
#include <sys/msg.h>

//共享内存
typedef struct {
    int value1;
    int value2;
} sensor_data_t;
#define SHM_KEY 0x1234

//消息队列
typedef struct {
    long mtype;
    char cmd[16];
} ctrl_msg_t;
#define MSG_KEY 0x5678

int parse_and_process(int sock, const char *query_string, const char *input);

#endif  // CUSTOM_HANDLE_H
